/** 
*@项目名称: Pear-Project-PPWhere 
*@文件名称: ServerBaseResult.java 
*@Author: linlin.zou
*@Date: 2014-12-16 
*@Copyright: 2014 www.alipear.com Inc. All rights reserved. 

*注意：本内容仅限于上海鸭梨网络有限公司内部传阅，禁止外泄以及用于其他的商业目的 
*/ 
package com.alipear.shopcredit.common.server.item;


import com.alipear.serverrequest.item.BaseResult;

public  class ServerBaseResult<E> extends BaseResult {

	private int Code =-1;//”:0,

	public String getMessage() {
		return Message;
	}

	private String Message;//”:”msg”,
	private E Data;

	public E getData() {
		return Data;
	}

	public boolean isSuccess() {
		return Code ==0;
	}

	public String getError() {
		String mesage = null;
		switch (Code) {
			case -1:
				mesage= "系统繁忙";
				break;
			case 0:
				mesage= Message;
				break;
			case 40001:
				mesage= "提交数据缺失";
				break;
			case 40002:
				mesage= "参数不正确";
				break;
			case 40003:
				mesage= "页面无响应";
				break;
			case 40004:
				mesage= "请求失败";
				break;
			case 40005:
				mesage= "手机号码已注册";
				break;
			case 40006:
				mesage= "密码错误";
				break;
			case 40007:
				mesage= "用户名不存在";
				break;
			case 40008:
				mesage= "验证码错误";
				break;
			case 40009:
				mesage= "违章处理失败";
				break;
			case 40010:
				mesage= "出题失败";
				break;
			case 40011:
				mesage= "发送验证码失败";
				break;
			case 40012:
				break;

			default:
				mesage= Message;
				break;
		}
		return mesage;
	}

}
